package com.qf.task;

import com.qf.websocket.MyCommandHandler;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/*
杨威
2022/1/7
14:05
*/
@Component
@EnableScheduling
//这是一个定时任务 没六十秒执行一次
public class DevicePowerTask {

    @Scheduled(fixedRate = 60000)
    public void checkHeartBeat(){
        MyCommandHandler.checkStatus();
    }
}
